1- retrive all sales order between 01-sep-90' and 01/sep/1991

   select * from sales_order where order_date between '01/sep/1990' and '01/sep/1991' 

2-display order detials when the order_id=565

  select order_id,product_id,actual_price,quantity from item where order_id=565

3-display order detials depended to sales order date and order_id
 
  select sales_order.order_id,product_id,actual_price,quantity from item,sales_order 
  where order_date='01-JUN-1991' and sales_order.order_id=item.order_id


***************************************QUERY 4*******************************************

4- display the sales order infomation include order_id,customer name,product description,quntity
    order date for specific order as user input.


   select item.order_id,name,description,quantity,order_date
   from customer,item,product,sales_order where customer.customer_id=sales_order.customer_id 
   and  sales_order.order_id=item.order_id and item.product_id=product.product_id
   and sales_order.order_id=&or

***************************************QUERY 5 :using in:************************************

5- display customer information(name ,address) whose sale product in following date(01/JUN/1991)

   select name,address from customer where customer_id in(
   select customer_id from sales_order where order_date='01/JUN/1991')

6- same quetion by using =any

   select name,address from customer where customer_id =any(
   select customer_id from sales_order where order_date='01/JUN/1991')

7)- retrive customer infomation(name address) and his order date for product 
    which has (id=104350) and oreder_date between '01/JUN/1990' and '30/JUL/1991' 
    order by customer name

    select distinct name,order_date from customer,sales_order 
    where ((sales_order.customer_id=customer.customer_id) 
    and (order_date between '07/JAN/1990'and '07/JAN/1990') and (customer.customer_id in(
    select customer_id from sales_order where order_id 
    in(select order_id from item where product_id=(select product_id from product
    where product_id=104350))))) order by name

8- give list for the customer did not sale in specific date , the date depended to user input
   like '01-JUN-1990';

  1- select distinct name,address from customer where customer_id not 
     in(select customer_id from sales_order
     where order_date between '&d1' and '&d2')

  2- select distinct name,address from customer where not exists (select customer_id from sales_order
     where order_date between '&d1' and '&d2')

9-   display item detials for specific order as input user(description,list_price,max_price)
  
     select description,list_price,min_price from price,product where
     price.product_id=product.product_id and price.product_id in(
     select product_id from item where order_id='&od')

 

 